import time
class wklogin(object):
    def __init__(self,driver):
        self.driver=driver

    def login(self):
        self.driver.find_element_by_name('username').send_keys('15770820028')
        self.driver.find_element_by_name('password').send_keys('123456')
        self.driver.find_element_by_xpath('//button[@type="button"]').click()
        time.sleep(6)

    def xiansoulogin(self):
        self.driver.find_element_by_name('username').send_keys('15770820028')
        self.driver.find_element_by_name('password').send_keys('123456')
        self.driver.find_element_by_xpath('//button[@type="button"]').click()
        time.sleep(6)
        self.driver.find_element_by_link_text('客户管理').click()
        time.sleep(8)
        self.driver.find_element_by_xpath("//li[@tabindex='-1']/span[text()='线索']").click()
        time.sleep(3)


